alter proc [dbo].[SP_GET_APPOINTMENTS_SPA_BYDATE]      
( @APP_DATE datetime,    
 @APP_STARTTIME DATETIME,  
@ACC_ID int  
)      
AS      
select  dbo.SPA.SPA_NAME,dbo.SPA.SPA_ID    
from dbo.SPA     
where SPA_ID NOT IN(      
 select APPOINTMENTS.SPA_ID from APPOINTMENTS       
where APP_STATUS!='DENY' AND APP_DATE=@APP_DATE AND APP_STARTTIME=@APP_STARTTIME)  
and dbo.SPA.ACC_ID=@ACC_ID